package com.sh.high_grade_component;

import android.os.Bundle;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.sh.high_grade_component.adapter.ImagePagerAdapater;
import com.sh.high_grade_component.entity.GoodsInfo;

import java.util.ArrayList;

public class ViewPageActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_view_page);


        ViewPager vpContent = findViewById(R.id.vp_content);
        ArrayList<GoodsInfo> mGoodsList = GoodsInfo.getDefaultList();
        ImagePagerAdapater imagePagerAdapater = new ImagePagerAdapater(this, mGoodsList);
        vpContent.setAdapter(imagePagerAdapater);


    }
}